package com.tuling.designpattern.command;

/**
 * @author 林瑞涛
 * @desc   调用者
 * @date 2021年08月03日 15:02
 */
public class Invoker {
    private Command command;

    public Invoker(Command command) {
        this.command = command;
    }

    public void setCommand(Command command) {
        this.command = command;
    }

    public void call(){
        System.out.println("调用者执行命令command...");
        command.execute();
    }
}
